import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    component: Layout,
    children: [{
      // 这里不设置值，是把main作为默认页面
      path: '/',
      name: 'index',
      component: () => import(/* webpackChunkName: "about" */ '../views/index/index.vue')
    },
    {
      // 这里不设置值，是把main作为默认页面
      path: '/test',
      name: 'test',
      component: () => import(/* webpackChunkName: "about" */ '../views/test/index.vue')
    }]
  }
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
